<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="UTF-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<title>Document</title>
	</head>
	<body>
		<div id="example1"></div>
		<div id="example2"></div>
		<script src="../js/react.development.js"></script>
		<script src="../js/react-dom.development.js"></script>
		<script src="../js/babel.min.js"></script>
		<script type="text/babel">
			function MyComponent(params) {
				return <h2>工厂函数</h2>;
			}

			class MyComponent2 extends React.Component {
				render() {
					return <h2>类方法</h2>;
				}
			}

			ReactDOM.render(<MyComponent />, example1);
			ReactDOM.render(<MyComponent2 />, example2);
		</script>
	</body>
</html>
